const {merge} = require('webpack-merge');
const prodBase = require('./webpack.prod.base');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { resolveApp} = require('./paths');
const { externalCfg, cdnCfg } = require('./cdn/index.js');
module.exports = merge(prodBase, {
    externals: {
        ...externalCfg, // 对象格式
    },
    plugins: [
        new HtmlWebpackPlugin({
            title: 'webpack5--cdn',
            template: resolveApp('./public/cdn.html'),
            favicon: resolveApp('./public/favicon.ico'),
            cdn: cdnCfg
        }),
    ]
});